package bishi.meituan;

import java.util.Scanner;

/**
 * @author: 唐小尊
 * @email: 1171702529@qq.com
 * @cate: 2021/05/09 10:52
 */
public class Main2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int h = sc.nextInt();
        sc.nextLine();
        int[] heights = new int[n];
        int index = 0;
        while (index < n){
            heights[index++] = sc.nextInt();
        }
        int num = 0;
        int left = -1;
        boolean p = true;//表示为结束
        for (int i=0;i<n;i++){
            if (heights[i]<=h){
                if (left==-1){
                    left = i+1;
                }
                num++;
                if (num==m){
                    System.out.println(left);
                    p= false;
                    break;
                }
            }else {
                left = -1;
                num = 0;
            }
        }
        if (p){
            System.out.println(-1);
        }
    }
}
